package com.ruoyi.passenger.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.passenger.mapper.TbPassengerDriverRoleMapper;
import com.ruoyi.passenger.domain.TbPassengerDriverRole;
import com.ruoyi.passenger.service.ITbPassengerDriverRoleService;

/**
 * 司机角色关联Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-21
 */
@Service
public class TbPassengerDriverRoleServiceImpl implements ITbPassengerDriverRoleService 
{
    @Autowired
    private TbPassengerDriverRoleMapper tbPassengerDriverRoleMapper;

    /**
     * 查询司机角色关联
     * 
     * @param driverRoleId 司机角色关联主键
     * @return 司机角色关联
     */
    @Override
    public TbPassengerDriverRole selectTbPassengerDriverRoleByDriverRoleId(Long driverRoleId)
    {
        return tbPassengerDriverRoleMapper.selectTbPassengerDriverRoleByDriverRoleId(driverRoleId);
    }

    /**
     * 查询司机角色关联列表
     * 
     * @param tbPassengerDriverRole 司机角色关联
     * @return 司机角色关联
     */
    @Override
    public List<TbPassengerDriverRole> selectTbPassengerDriverRoleList(TbPassengerDriverRole tbPassengerDriverRole)
    {
        return tbPassengerDriverRoleMapper.selectTbPassengerDriverRoleList(tbPassengerDriverRole);
    }

    /**
     * 新增司机角色关联
     * 
     * @param tbPassengerDriverRole 司机角色关联
     * @return 结果
     */
    @Override
    public int insertTbPassengerDriverRole(TbPassengerDriverRole tbPassengerDriverRole)
    {
        return tbPassengerDriverRoleMapper.insertTbPassengerDriverRole(tbPassengerDriverRole);
    }

    /**
     * 修改司机角色关联
     * 
     * @param tbPassengerDriverRole 司机角色关联
     * @return 结果
     */
    @Override
    public int updateTbPassengerDriverRole(TbPassengerDriverRole tbPassengerDriverRole)
    {
        return tbPassengerDriverRoleMapper.updateTbPassengerDriverRole(tbPassengerDriverRole);
    }

    /**
     * 批量删除司机角色关联
     * 
     * @param driverRoleIds 需要删除的司机角色关联主键
     * @return 结果
     */
    @Override
    public int deleteTbPassengerDriverRoleByDriverRoleIds(Long[] driverRoleIds)
    {
        return tbPassengerDriverRoleMapper.deleteTbPassengerDriverRoleByDriverRoleIds(driverRoleIds);
    }

    /**
     * 删除司机角色关联信息
     * 
     * @param driverRoleId 司机角色关联主键
     * @return 结果
     */
    @Override
    public int deleteTbPassengerDriverRoleByDriverRoleId(Long driverRoleId)
    {
        return tbPassengerDriverRoleMapper.deleteTbPassengerDriverRoleByDriverRoleId(driverRoleId);
    }
}
